// Tester.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"

//#include <boost/test/unit_test.hpp>
/*int _tmain(int argc, _TCHAR* argv[])
{
	return 0;
}*/

// TestingApp.cpp : Defines the entry point for the console application.
//
#pragma once
#include "stdafx.h"
#define BOOST_TEST_MODULE MyTest

#include <boost/test/unit_test.hpp>
#include <boost/python.hpp>

using namespace boost;
using namespace boost::unit_test;
using namespace boost::python;

/*int _tmain(int argc, _TCHAR* argv[])
{
	return 0;
}*/

BOOST_AUTO_TEST_SUITE(PythonFaifTest)

BOOST_AUTO_TEST_CASE(DomainsTest)
{
	Py_Initialize();
	python::exec("import Myfaif\n");
	BOOST_CHECK_EQUAL(22, 21);

/*
	PyObject* py_datetime = boost::python::object(pTime).ptr();

	BOOST_REQUIRE(py_datetime != NULL);
	BOOST_REQUIRE(PyDateTime_Check(py_datetime));

	BOOST_CHECK_EQUAL(PyDateTime_GET_YEAR(py_datetime), 2012);
	BOOST_CHECK_EQUAL(PyDateTime_GET_MONTH(py_datetime), 12);
	BOOST_CHECK_EQUAL(PyDateTime_GET_DAY(py_datetime), 21);
	BOOST_CHECK_EQUAL(PyDateTime_DATE_GET_HOUR(py_datetime), 23);
	BOOST_CHECK_EQUAL(PyDateTime_DATE_GET_MINUTE(py_datetime), 59);
	BOOST_CHECK_EQUAL(PyDateTime_DATE_GET_SECOND(py_datetime), 59);
	BOOST_CHECK_EQUAL(PyDateTime_DATE_GET_MICROSECOND(py_datetime), 999999);*/
}
/*
BOOST_AUTO_TEST_CASE(convertTestTwo)
{
	boost::gregorian::date gDate(1986, 04, 26);
	boost::posix_time::time_duration tDuration(02, 37, 48, 923742);

	boost::posix_time::ptime pTime(gDate, tDuration);

	PyObject* py_datetime = boost::python::object(pTime).ptr();

	BOOST_REQUIRE(py_datetime != NULL);
	BOOST_REQUIRE(PyDateTime_Check(py_datetime));

	BOOST_CHECK_EQUAL(PyDateTime_GET_YEAR(py_datetime), 1986);
	BOOST_CHECK_EQUAL(PyDateTime_GET_MONTH(py_datetime), 04);
	BOOST_CHECK_EQUAL(PyDateTime_GET_DAY(py_datetime), 26);
	BOOST_CHECK_EQUAL(PyDateTime_DATE_GET_HOUR(py_datetime), 02);
	BOOST_CHECK_EQUAL(PyDateTime_DATE_GET_MINUTE(py_datetime), 37);
	BOOST_CHECK_EQUAL(PyDateTime_DATE_GET_SECOND(py_datetime), 48);
	BOOST_CHECK_EQUAL(PyDateTime_DATE_GET_MICROSECOND(py_datetime), 923742);
}

BOOST_AUTO_TEST_CASE(convertTestThree)
{
	boost::gregorian::date gDate(1906, 01, 31);
	boost::posix_time::time_duration tDuration(12, 19, 20, 572384);

	boost::posix_time::ptime pTime(gDate, tDuration);

	PyObject* py_datetime = boost::python::object(pTime).ptr();

	BOOST_REQUIRE(py_datetime != NULL);
	BOOST_REQUIRE(PyDateTime_Check(py_datetime));

	BOOST_CHECK_EQUAL(PyDateTime_GET_YEAR(py_datetime), 1906);
	BOOST_CHECK_EQUAL(PyDateTime_GET_MONTH(py_datetime), 01);
	BOOST_CHECK_EQUAL(PyDateTime_GET_DAY(py_datetime), 31);
	BOOST_CHECK_EQUAL(PyDateTime_DATE_GET_HOUR(py_datetime), 12);
	BOOST_CHECK_EQUAL(PyDateTime_DATE_GET_MINUTE(py_datetime), 19);
	BOOST_CHECK_EQUAL(PyDateTime_DATE_GET_SECOND(py_datetime), 20);
	BOOST_CHECK_EQUAL(PyDateTime_DATE_GET_MICROSECOND(py_datetime), 572384);
}*/

BOOST_AUTO_TEST_SUITE_END()
